# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=choqok
pkgver=1.7.0
pkgrel=4
pkgdesc="A micro-blogging client"
url="https://choqok.kde.org/"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> purpose
arch="all !armhf !ppc64le !s390x !riscv64"
license="GPL-2.0-only OR GPL-3.0-only"
makedepends="
	extra-cmake-modules
	kcmutils5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kdoctools5-dev
	kemoticons5-dev
	kglobalaccel5-dev
	kguiaddons5-dev
	ki18n5-dev
	kio5-dev
	knotifications5-dev
	knotifyconfig5-dev
	kparts5-dev
	ktextwidgets5-dev
	kwallet5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	purpose5-dev
	qca-dev
	qt5-qtbase-dev
	qt5-qtnetworkauth-dev
	samurai
	sonnet5-dev
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/network/choqok.git"
source="https://download.kde.org/stable/choqok/${pkgver%.*}/src/choqok-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/cmake "$pkgdir"/usr/lib
}

sha512sums="6f5998078e555f7b4a40270ad0a4defa2d15bb8440b810320fc4cfc38d78cb34bb9b2f6a38eb33eb3217b51a78a7fbc7f79224cd0ddb0fcbf8c9035d8e600e96  choqok-1.7.0.tar.xz"
